.class Lorg/zeam/Launcher$ApplicationsIntentReceiver;
.super Landroid/content/BroadcastReceiver;
.source "Launcher.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lorg/zeam/Launcher;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ApplicationsIntentReceiver"
.end annotation


# instance fields
.field final synthetic this$0:Lorg/zeam/Launcher;


# direct methods
.method private constructor <init>(Lorg/zeam/Launcher;)V
    .locals 0
    .parameter

    .prologue
    .line 2359
    iput-object p1, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lorg/zeam/Launcher;Lorg/zeam/Launcher$ApplicationsIntentReceiver;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 2359
    invoke-direct {p0, p1}, Lorg/zeam/Launcher$ApplicationsIntentReceiver;-><init>(Lorg/zeam/Launcher;)V

    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 8
    .parameter "context"
    .parameter "intent"

    .prologue
    .line 2364
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    .line 2365
    .local v0, action:Ljava/lang/String;
    const-string v5, "android.intent.action.PACKAGE_CHANGED"

    invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_0

    const-string v5, "android.intent.action.PACKAGE_REMOVED"

    invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_0

    const-string v5, "android.intent.action.PACKAGE_ADDED"

    invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_5

    .line 2367
    :cond_0
    invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v5

    invoke-virtual {v5}, Landroid/net/Uri;->getSchemeSpecificPart()Ljava/lang/String;

    move-result-object v2

    .line 2368
    .local v2, packageName:Ljava/lang/String;
    const-string v5, "android.intent.extra.REPLACING"

    const/4 v6, 0x0

    invoke-virtual {p2, v5, v6}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v4

    .line 2375
    .local v4, replacing:Z
    const-string v5, "android.intent.action.PACKAGE_CHANGED"

    invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_2

    .line 2376
    const-string v5, "android.intent.action.PACKAGE_REMOVED"

    invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_3

    .line 2377
    if-nez v4, :cond_1

    .line 2378
    iget-object v5, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-static {v5, v2}, Lorg/zeam/Launcher;->access$14(Lorg/zeam/Launcher;Ljava/lang/String;)V

    .line 2382
    invoke-static {}, Lorg/zeam/Launcher;->access$1()Lorg/zeam/LauncherModel;

    move-result-object v5

    iget-object v6, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-static {v6}, Lorg/zeam/Launcher;->access$15(Lorg/zeam/Launcher;)Lorg/zeam/ApplicationsView;

    move-result-object v6

    invoke-virtual {v5, v6, v2}, Lorg/zeam/LauncherModel;->removePackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V

    .line 2398
    :cond_1
    :goto_0
    iget-object v5, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    const/4 v6, 0x2

    invoke-virtual {v5, v6}, Lorg/zeam/Launcher;->removeDialog(I)V

    .line 2427
    .end local v2           #packageName:Ljava/lang/String;
    .end local v4           #replacing:Z
    :cond_2
    return-void

    .line 2385
    .restart local v2       #packageName:Ljava/lang/String;
    .restart local v4       #replacing:Z
    :cond_3
    if-nez v4, :cond_4

    .line 2389
    invoke-static {}, Lorg/zeam/Launcher;->access$1()Lorg/zeam/LauncherModel;

    move-result-object v5

    iget-object v6, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-static {v6}, Lorg/zeam/Launcher;->access$15(Lorg/zeam/Launcher;)Lorg/zeam/ApplicationsView;

    move-result-object v6

    invoke-virtual {v5, v6, v2}, Lorg/zeam/LauncherModel;->addPackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V

    goto :goto_0

    .line 2394
    :cond_4
    invoke-static {}, Lorg/zeam/Launcher;->access$1()Lorg/zeam/LauncherModel;

    move-result-object v5

    iget-object v6, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-static {v6}, Lorg/zeam/Launcher;->access$15(Lorg/zeam/Launcher;)Lorg/zeam/ApplicationsView;

    move-result-object v6

    invoke-virtual {v5, v6, v2}, Lorg/zeam/LauncherModel;->updatePackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V

    .line 2395
    iget-object v5, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-static {v5, v2}, Lorg/zeam/Launcher;->access$16(Lorg/zeam/Launcher;Ljava/lang/String;)V

    goto :goto_0

    .line 2405
    .end local v2           #packageName:Ljava/lang/String;
    .end local v4           #replacing:Z
    :cond_5
    const-string v5, "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"

    invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_6

    .line 2406
    const-string v5, "android.intent.extra.changed_package_list"

    invoke-virtual {p2, v5}, Landroid/content/Intent;->getStringArrayExtra(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    .line 2407
    .local v3, packages:[Ljava/lang/String;
    if-eqz v3, :cond_2

    array-length v5, v3

    if-eqz v5, :cond_2

    .line 2410
    const/4 v1, 0x0

    .local v1, i:I
    :goto_1
    array-length v5, v3

    if-ge v1, v5, :cond_2

    .line 2411
    invoke-static {}, Lorg/zeam/Launcher;->access$1()Lorg/zeam/LauncherModel;

    move-result-object v5

    iget-object v6, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-static {v6}, Lorg/zeam/Launcher;->access$15(Lorg/zeam/Launcher;)Lorg/zeam/ApplicationsView;

    move-result-object v6

    aget-object v7, v3, v1

    invoke-virtual {v5, v6, v7}, Lorg/zeam/LauncherModel;->addPackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V

    .line 2412
    iget-object v5, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    aget-object v6, v3, v1

    invoke-static {v5, v6}, Lorg/zeam/Launcher;->access$16(Lorg/zeam/Launcher;Ljava/lang/String;)V

    .line 2410
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 2415
    .end local v1           #i:I
    .end local v3           #packages:[Ljava/lang/String;
    :cond_6
    const-string v5, "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE"

    invoke-virtual {v5, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_2

    .line 2416
    const-string v5, "android.intent.extra.changed_package_list"

    invoke-virtual {p2, v5}, Landroid/content/Intent;->getStringArrayExtra(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    .line 2417
    .restart local v3       #packages:[Ljava/lang/String;
    if-eqz v3, :cond_2

    array-length v5, v3

    if-eqz v5, :cond_2

    .line 2420
    const/4 v1, 0x0

    .restart local v1       #i:I
    :goto_2
    array-length v5, v3

    if-ge v1, v5, :cond_2

    .line 2421
    invoke-static {}, Lorg/zeam/Launcher;->access$1()Lorg/zeam/LauncherModel;

    move-result-object v5

    iget-object v6, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    invoke-static {v6}, Lorg/zeam/Launcher;->access$15(Lorg/zeam/Launcher;)Lorg/zeam/ApplicationsView;

    move-result-object v6

    aget-object v7, v3, v1

    invoke-virtual {v5, v6, v7}, Lorg/zeam/LauncherModel;->removePackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V

    .line 2422
    iget-object v5, p0, Lorg/zeam/Launcher$ApplicationsIntentReceiver;->this$0:Lorg/zeam/Launcher;

    aget-object v6, v3, v1

    invoke-static {v5, v6}, Lorg/zeam/Launcher;->access$16(Lorg/zeam/Launcher;Ljava/lang/String;)V

    .line 2420
    add-int/lit8 v1, v1, 0x1

    goto :goto_2
.end method
